import server from "@/utils/request";

export const get_fav_list = (params)=>{
    return server({
        method:'get',
        url:`/knowledge/favorite/${params.id}`
    })
}

export const get_fav_detail = (params)=>{
    return server({
        method:'get',
        url:`/knowledge/${params.id}`
    })
}

export const move_fav = (id,params)=>{
    return server({
        method:'put',
        url:`/knowledge/${id}/favorite`,
        data:{
            favorite_id:params
        }
    })
}

export const del_fav = (params)=>{
    return server({
        method:'delete',
        url:`/knowledge/${params.id}`
    })
}

export const get_hello = (params)=>{
    return server({
        method:'post',
        url:'/chat/hello',
        data:params
    })
}

export const get_hisyory_chat = (params)=>{
    return server({
        method:'get',
        url:'/chat/history',
        params:params
    })
}

export const knowledge_search = (params)=>{
    return server({
        method:'get',
        url:'/knowledge/search',
        params:params
    })
}

export const move_batch = (params)=>{
    return server({
        method:'post',
        url:'/knowledge/move/favorites',
        data:params
    })
}


export const get_status = (id)=>{
    return server({
        method:'get',
        url:`/knowledge/${id}/status`
    })
}